<template>
  <div class="home">
    <!-- swiper -->
    <van-swipe
      class="my-swipe"
      :autoplay="3000"
      indicator-color="white"
    >
      <van-swipe-item>1</van-swipe-item>
      <van-swipe-item>2</van-swipe-item>
      <van-swipe-item>3</van-swipe-item>
      <van-swipe-item>4</van-swipe-item>
    </van-swipe>
    <!-- grid -->
    <van-grid :column-num="3">
      <van-grid-item
        v-for="value in 6"
        :key="value"
        icon="photo-o"
        text="文字"
      />
    </van-grid>
  </div>
</template>
<script>
export default {
  data() {
    return {

    }
  },
  created() {
    this.$http.getLunbo().then(res => {
      console.log(res)
    })
  }
}
</script>
<style lang="scss" scoped>
/* lang 是设置使用哪个预编译语言，
scoped  样式作用于  限制当前样式只能在当前组件使用 */
.home {
  .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
  }
}
</style>